package syncmaster;
import java.awt.GridLayout;
import java.awt.event.AWTEventListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;

public class ListaTestDrive extends JFrame implements ActionListener{
    private JMenuBar barra1;
    private JMenu menu1;
    private JMenuItem item1, item2, item3, item4;
    private JButton model1, model2, model3, model4;
    private JPanel buttonPanel;

    public ListaTestDrive(){
    	
    	JFrame frame = new JFrame("Seleccion");
    	JPanel buttonPanel = new JPanel(new GridLayout(1, 3));
    	barra1= new JMenuBar();
    	model1 = new JButton("HeartBeat Model");
    	model2 = new JButton("Beat Model");
    	model3 = new JButton("Radar Model");
    	model1.addActionListener(this);
    	model2.addActionListener(this);
    	model3.addActionListener(this);
    	buttonPanel.add(model1);
    	buttonPanel.add(model2);
    	buttonPanel.add(model3);
    	frame.add(buttonPanel);
    	frame.pack();
    	frame.setVisible(true);

 }
    
    public void actionPerformed(ActionEvent event) {
		if (event.getSource() == model1) {
			HeartModel heartModel = new HeartModel();
	        ControllerInterface model = new HeartController(heartModel);
		} else if (event.getSource() == model2) {
			BeatModelInterface model = new BeatModel();
			ControllerInterface controller = new BeatController(model);
		} else if (event.getSource() == model3) {
			RadarModel radarModel = new RadarModel();
	        ControllerInterface model = new RadarController(radarModel);
		}
		}
    
    
 public static void main(String[] args) {
       ListaTestDrive marco = new ListaTestDrive();
 }

}
 

 
 